-module(pif).
-export([pifag/1]).
-import (lists, [seq/2, sum/1]).

pifag(X) -> 
 [ {A,B,C} ||
     A <- lists:seq(1,X),
	 B <- lists:seq(1,X),
	 C <- lists:seq(1,X),
	A+B+C =< X,
	A*A+B*B =:= C*C  
 ].